Skip to content

feat(react-kit): email otp authentication flow#100

Merged
OmarBasem merged 9 commits intomainfrom
omar/email-verification
Apr 24, 2026
Merged

feat(react-kit): email otp authentication flow#100
OmarBasem merged 9 commits intomainfrom
omar/email-verification

Conversation

@OmarBasem
Copy link
Copy Markdown
Member

@OmarBasem OmarBasem commented Apr 15, 2026

Closes FS-1958, FS-1961, FS-1962, FS-1959

Summary

This PR implements UI for the rest of the email otp auth flow

Demo

demo.mp4

@OmarBasem OmarBasem changed the title feat: email verification feat(react-kit): email authentication otp flow Apr 15, 2026
@OmarBasem OmarBasem self-assigned this Apr 15, 2026
@OmarBasem OmarBasem changed the title feat(react-kit): email authentication otp flow feat(react-kit): email otp authentication flow Apr 15, 2026
Comment on lines +29 to 37
const handleVerify = async () => {
if (!otp.trim() || !otpId) return

setError(false)
try {
await verifyOtp({ otpId, code })
await verifyOtp({ otpId, code: otp.trim() })
goToStep('authenticated')
config?.onSuccess?.()
} catch (err) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if we need the Verifying screen for the manual otp flow, we can verify the otp on the same screen as shown in the demo video

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think it's better if we remove the screen itself now and verify on the same screen.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brtkx I think we can keep it for magic link?

@OmarBasem OmarBasem requested a review from brtkx April 16, 2026 05:44
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from 028cc7b to dbae517 Compare April 17, 2026 12:27
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from dbae517 to 6bce2fe Compare April 20, 2026 04:15
@OmarBasem OmarBasem force-pushed the omar/sign-up-page branch 2 times, most recently from 053ca18 to 40004db Compare April 20, 2026 04:32
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from 6bce2fe to 1f59081 Compare April 20, 2026 04:32
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from 1f59081 to 3d69c8c Compare April 21, 2026 07:13
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from 3d69c8c to fc89cf5 Compare April 22, 2026 13:07
@OmarBasem OmarBasem force-pushed the omar/email-verification branch 2 times, most recently from 6bd5e27 to 5538f07 Compare April 22, 2026 14:29
@OmarBasem OmarBasem changed the base branch from omar/sign-up-page to main April 22, 2026 14:33
# Conflicts:
#	packages/react-kit/src/shared/components/AppLogo/AppLogo.test.tsx
@OmarBasem OmarBasem force-pushed the omar/email-verification branch from 5538f07 to 66e517e Compare April 22, 2026 14:34
Comment thread packages/react-kit/src/shared/components/AppLogo/index.tsx
Comment on lines +29 to 37
const handleVerify = async () => {
if (!otp.trim() || !otpId) return

setError(false)
try {
await verifyOtp({ otpId, code })
await verifyOtp({ otpId, code: otp.trim() })
goToStep('authenticated')
config?.onSuccess?.()
} catch (err) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think it's better if we remove the screen itself now and verify on the same screen.

},
}

export const FourDigits: Story = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing the length prop?

Copy link
Copy Markdown
Member Author

@OmarBasem OmarBasem Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

(I was thinking devs would be using our ZD backend which is using 6 digit code, but yeah keeping it dynamic makes sense anyways 👍 )

Comment thread packages/react-kit/src/auth/pages/EmailVerification.tsx
Comment thread packages/react-kit/src/auth/components/CodeInput/index.tsx
@OmarBasem OmarBasem requested a review from brtkx April 22, 2026 16:09
@OmarBasem OmarBasem merged commit 2b9629a into main Apr 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants